module CartsHelper
  def order_status_to_text(order_placed, order_shipped)
    if (order_shipped)
      return t('order.done')
    elsif (order_placed)
      return t('order.ready_for_shipping')
    else
      return t('order.open')
    end
  end

  def payment_method_to_text(payment_method_as_int)
    case payment_method_as_int
      when 1
        return t "order.pay.bill"
      when 2
        return t "order.pay.credit_card"
      when 3
        return t "order.pay.advance_payment"
    end
  end

  def pdf_icon
    image_tag("page_white_acrobat.png", :alt => "PDF")
  end

end